/*
 *  testMultiTransOneTable.cpp
 *  kangmodb
 *
 *  Created by 강모 김 on 11. 4. 11..
 *  Copyright 2011 강모소프트. All rights reserved.
 *
 */

#include "gtest/gtest.h"

#include "kangmodb.h"
#include "testCommon.h"

/** @brief Test running IUDS on a table by multiple transactions. 
 */
class MultiTransOneTableTest : public testing::Test {
protected:  // You should make the members protected s.t. they can be
	// accessed from sub-classes.
	
	// virtual void SetUp() will be called before each test is run.  You
	// should define it if you need to initialize the varaibles.
	// Otherwise, this can be skipped.
	virtual void SetUp() {
		ASSERT_TRUE( setup_cursor( &db_, &tx_, &tableId_, &cursor_ ) == 0 );
	}
	
	// virtual void TearDown() will be called after each test is run.
	// You should define it if there is cleanup work to do.  Otherwise,
	// you don't have to provide it.
	//
	virtual void TearDown() {
		// close table succeeds
		ASSERT_TRUE( teardown_cursor( &db_, &tx_, &tableId_, &cursor_ ) == 0 );
	}
protected:
	stgKangmoDB * db_;
	stgTransaction * tx_;
	stgTableId tableId_;
	stgTableCursor * cursor_;
};

/** @breif Test running Insert on a table.
 */
TEST_F(MultiTransOneTableTest, DISABLED_Insert) {
}

/** @breif Test running Update on a table.
 */
TEST_F(MultiTransOneTableTest, DISABLED_Update) {
}

/** @breif Test running Select on a table.
 */
TEST_F(MultiTransOneTableTest, DISABLED_Select) {
}

/** @breif Test running Delete on a table.
 */
TEST_F(MultiTransOneTableTest, DISABLED_Delete) {
}

/** @breif Test running Select on a table after all rows are deleted.
 */
TEST_F(MultiTransOneTableTest, DISABLED_SelectAfterDelete) {
}

/** @breif Test running Insert and Update on a table at the same time.
 */
TEST_F(MultiTransOneTableTest, DISABLED_InsertUpdate) {
}

/** @breif Test running Insert and Delete on a table at the same time.
 */
TEST_F(MultiTransOneTableTest, DISABLED_InsertDelete) {
}

/** @breif Test running Insert and Select on a table at the same time.
 */
TEST_F(MultiTransOneTableTest, DISABLED_InsertSelect) {
}

/** @breif Test running Update and Delete on a table at the same time.
 */
TEST_F(MultiTransOneTableTest, DISABLED_UpdateDelete) {
}

/** @breif Test running Update and Select on a table at the same time.
 */
TEST_F(MultiTransOneTableTest, DISABLED_UpdateSelect) {
}

/** @breif Test running Delete and Select on a table at the same time.
 */
TEST_F(MultiTransOneTableTest, DISABLED_DeleteSelect) {
}

/** @breif Test running Insert/Update/Delete on a table at the same time.
 */
TEST_F(MultiTransOneTableTest, DISABLED_InsertUpdateDelete) {
}

/** @breif Test running Insert/Update/Select on a table at the same time.
 */
TEST_F(MultiTransOneTableTest, DISABLED_InsertUpdateSelect) {
}

/** @breif Test running Insert/Delete/Select on a table at the same time.
 */
TEST_F(MultiTransOneTableTest, DISABLED_InsertDeleteSelect) {
}

/** @breif Test running Update/Delete/Select on a table at the same time.
 */
TEST_F(MultiTransOneTableTest, DISABLED_UpdateDeleteSelect) {
}

/** @breif Test running Insert/Update/Delete/Select on a table at the same time.
 */
TEST_F(MultiTransOneTableTest, DISABLED_InsertUpdateDeleteSelect) {
}

/** @breif Dirty test accessing cursors opened by other transactions
 */
TEST_F(MultiTransOneTableTest, DISABLED_Dirty_AccessOtherTranasctionsCursor) {
}